import request from '@/utils/request.js'
// 获取用户信息
export function getUserInfo(id) {
  const date = { userId: id }
  return request({
    url: '/user/getUser',
    method: 'post',
    params: date,
  })
}
// 用户登录
export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data: data,
  })
}
// 用户注册
export function register(data) {
  return request({
    url: '/user/register',
    method: 'post',
    data: data,
  })
}
// 用户退出登录
export function logout(data) {
  return request({
    url: '/user/logout',
    method: 'post',
    data: '',
  })
}
